﻿using System.Net;
using httpExplorer.ViewModel;

namespace httpExplorer.Model
{
    public class ModelLocator : IModel
    {
        public INetworkingModel NetworkingModel { get; private set; }

        public ModelLocator()
        {
            NetworkingModel = new NetworkingModel();
        }

        public void InitiateHttpRequest(string url, IWebProxy proxy = null)
        {
            NetworkingModel.InitiateHttpRequest(url, proxy);
        }

        public void InitiateHttpRequestUsingSystemProxy(string url)
        {
            NetworkingModel.InitiateHttpRequestUsingSystemProxy(url);
        }

        public void InitiateHttpRequestUsingProxy(string url, string proxyUri, bool useDefaultCredentials = false )
        {
            NetworkingModel.InitiateHttpRequestUsingProxy(url, proxyUri, useDefaultCredentials);
        }

        public void InitiateHttpRequestUsingProxy(string url, string proxyUri, string username, string password, string domain)
        {
            NetworkingModel.InitiateHttpRequestUsingProxy(url, proxyUri, username, password, domain);
        }
    }
}
